// 域名
//var host = "https://dev.artbounds.com"
//var host = "https://stg.artbounds.com"
//var host = "https://wd.artbounds.com"
//var host = "http://127.0.0.1:81"
// 请求集合
const Hosts = {
  dev: 'http://127.0.0.1:81',   //开发环境
  hidden: "https://stg.artbounds.com", //预发布环境
  prod: 'https://wd.artbounds.com', //线上环境
};
const { envVersion } = wx.getAccountInfoSync().miniProgram;
let host = "";
switch (envVersion) {
  case 'develop':
    host = `${Hosts.dev}`;
      break;
  case 'trial':
    host = `${Hosts.hidden}`;
      break;
  case 'release':
    host = `${Hosts.prod}`;
      break;
  default:
    host = `${Hosts.prod}`;
      break;
}
console.log("host init")
console.log(host)

var api = new Map();
// 教师端
// 查询班级
api.set("queryClass", "/api/miniprogram/teacher/queryClass.do");
// 课程列表查询
api.set("queryCourse","/api/miniprogram/teacher/queryCourse.do");
// 某班级学员查询接口
api.set("queryStudent", "/api/miniprogram/teacher/queryStudent.do");
// 教师登录接口
api.set("teacherLogin", "/api/miniprogram/common/teacherLogin.do");
// 教师登录接口
api.set("teacherLoginWithCache", "/api/miniprogram/common/teacherLoginWithCache.do");
// 教师添加作业
api.set("addHomework", "/api/miniprogram/teacher/addHomework.do");
// 班级作业查询接口
api.set("queryMyClass", "/api/miniprogram/teacher/queryMyClass.do");
// 班级作业的课程列表
api.set("queryMyClassDetail", "/api/miniprogram/teacher/queryMyClassDetail.do");
// 我的学员查询接口
api.set("queryAllStudent", "/api/miniprogram/teacher/queryAllStudent.do");
// 作业完成情况接口
api.set("queryIsFinish", "/api/miniprogram/teacher/queryIsFinish.do");
// 班级作业的课程列表
api.set("queryClassById", "/api/miniprogram/teacher/queryClassById.do");
// 班级课程列表
api.set("queryCourseByClass", "/api/miniprogram/teacher/queryCourseByClass.do");
// 学生课程和关键动作列表
api.set("teacher/queryStudentCourses", "/api/miniprogram/teacher/queryStudentCourses.do");
// 更新学生动作
api.set("teacher/updateStudentCourseFeatures", "/api/miniprogram/teacher/updateStudentCourseFeatures.do");


// 学生端
// 课程查询
api.set("student-queryCourse", "/api/miniprogram/student/queryCourse.do");
// 查询课程
api.set("/student/queryFeatuesOfCourse.do", "/api/miniprogram/student/queryFeatuesOfCourse.do");
// 作业查询
api.set("stu-queryHomework", "/api/miniprogram/student/queryHomework.do");
// 历史记录查询
api.set("stu-queryHistory", "/api/miniprogram/student/queryHistory.do");
// 学生注册接口
api.set("studentSignInClass", "/api/miniprogram/common/studentSignInClass.do");
// 获取学生id接口
api.set("studentLogin", "/api/miniprogram/common/studentLogin.do");
// 获取相关课程接口
api.set("queryRelCourse", "/api/miniprogram/student/queryRelCourse.do");
// 完成作业接口
api.set("finishHomework", "/api/miniprogram/student/finishHomework.do");
// 查询学生班级和课程统计信息
api.set("/student/queryClassList.do", "/api/miniprogram/student/queryClassList.do");

// 公共接口
// 登录接口
api.set("authCode2Session", "/api/miniprogram/common/authCode2Session.do");
// 获取用户信息接口
api.set("wxSetUserInfo", "/api/miniprogram/common/wxSetUserInfo.do");
// 课程等级枚举查询接口
api.set("courseLevels", "/api/miniprogram/common/courseLevels.do");
// 课程等级枚举查询接口
api.set("courseKind", "/api/miniprogram/common/courseKind.do");
// 舞蹈种类枚举查询接口             
api.set("fullDangceTypes", "/api/miniprogram/common/fullDangceTypes.do");
// 课程性质查询接口
api.set("courseNatrue", "/api/miniprogram/common/courseNature.do");
module.exports = {
  api,
  host
}